Skip to content

refactor: move fee fields resolution into validation methods#3461

Merged
klkvr merged 4 commits intomainfrom
klkvr/refactor-load-fee-fields
Apr 7, 2026
Merged

refactor: move fee fields resolution into validation methods#3461
klkvr merged 4 commits intomainfrom
klkvr/refactor-load-fee-fields

Conversation

@klkvr
Copy link
Copy Markdown
Member

@klkvr klkvr commented Apr 6, 2026

load_fee_fields is a bit weird because it's technically performing a stateful validation of the fee token before any stateless validations of the transaction happened

revm defines clear separation of stateless and stateful checks (validate_env vs validate_against_state_and_deduct_caller) and this PR changes fee token/payer resolution to follow it as well

@klkvr klkvr changed the title refactor: move fee filelds resolution into validation methods refactor: move fee fields resolution into validation methods Apr 7, 2026
Copy link
Copy Markdown
Contributor

@0xrusowsky 0xrusowsky Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: the check now happens in validate_against_state_and_deduct_caller

Copy link
Copy Markdown
Contributor

@0xrusowsky 0xrusowsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, this is a great simplification!

@klkvr klkvr added this pull request to the merge queue Apr 7, 2026
@klkvr klkvr removed this pull request from the merge queue due to a manual request Apr 7, 2026
@klkvr klkvr enabled auto-merge April 7, 2026 12:14
@klkvr klkvr added this pull request to the merge queue Apr 7, 2026
Merged via the queue into main with commit d6f618a Apr 7, 2026
33 checks passed
@klkvr klkvr deleted the klkvr/refactor-load-fee-fields branch April 7, 2026 12:40
github-merge-queue bot pushed a commit that referenced this pull request Apr 8, 2026
)

Based on #3461

Changes `TempoTransactionValidator` to fully delegate validation of
transactions to `TempoEvm`.

This removes a lot of tests (mostly the ones that were covering
`validate_against_keychain`). My assumption is that validator would now
fully inherit EVM test coverage and if some scenarios are not covered
there we should just migrate the tests

---------

Co-authored-by: Amp <amp@ampcode.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants